package se.penselnsvag.bookdb.tech.log.formater{
	import se.penselnsvag.bookdb.tech.log.LogMessage;
	


/**
* SimpleFormater,
*
* Formater public class for formating LogMessages with minimal LogInfoMessage.
*
* Author:christian.vejrich@gimlet.se
* Date: 2006-02-23
* Version: 1.0
* History: -
*/


public class SimpleFormater implements IFormater
{
	public function SimpleFormater(){}
	
	private static var instance:SimpleFormater;
	
	public static function getInstance() : IFormater
	{
		if(instance==null)
		{
			instance = new SimpleFormater();	
		}
		return instance;
	}
	
	public function format(logMessage:LogMessage) : String
	{
		var str : String = " " + logMessage.getLogClassName();
		str += " : " + logMessage.getLogMethodName();
		str += " : " + logMessage.getLogMessage();
		str += (logMessage.getLogException()==null)? 
		" " : " : " +logMessage.getLogException().toString();
		
		return str;
	}		
}
}